import 'package:event_bus/event_bus.dart';
import 'package:flutter/material.dart';
import 'package:flutterdouban/pages/group/group_content.dart';

class JKGroupPage extends StatelessWidget {

  final GlobalKey<JKGroupContentState> demo01Key = GlobalKey();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('小组'),
      ),
      body: JKGroupContent(key: demo01Key),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.play_circle_filled),
        onPressed: () {
          if (!demo01Key.currentState.controller.isAnimating) {
            demo01Key.currentState.controller.forward();
          } else {
            demo01Key.currentState.controller.stop();
          }
        },
      ),
    );
  }
}
